package cbbx_sm.decision_maker.search;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;


public class DynamicProgrammingTableEntry implements Serializable {
	public double scoreFloor;
	public String bestActionFloor;
	public double scoreCeiling;
	public String bestActionCeiling;
	public double scoreNN;
	public String bestActionNN;
	public double scoreInterpulated;
	public String bestActionInterpulated;
	public String originalState;
	public Map<String, Double> actionToScore;
	
	public DynamicProgrammingTableEntry(DynamicProgrammingTableEntry original) {
		this.bestActionCeiling = original.bestActionCeiling;
		this.bestActionFloor = original.bestActionFloor;
		this.bestActionInterpulated = original.bestActionInterpulated;
		this.originalState = original.originalState;
		this.scoreCeiling = original.scoreCeiling;
		this.scoreFloor = original.scoreFloor;
		this.scoreInterpulated = original.scoreInterpulated;
		this.scoreNN = original.scoreNN;
		this.bestActionNN = original.bestActionNN;
		this.actionToScore = new HashMap<String, Double>();
		for (Entry<String, Double> e : original.actionToScore.entrySet()) {
			this.actionToScore.put(e.getKey(), e.getValue());
		}
	}

	// Making sure the default constructor is visible.
	public DynamicProgrammingTableEntry() {
	}
}
